package com.czkj.hwz.decorate.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.czkj.hwz.decorate.Activity.PersonalDataActivity;
import com.czkj.hwz.decorate.Activity.SettingsActivity;
import com.czkj.hwz.decorate.R;
import com.king.base.BaseFragment;

/**
 * 作者：lxm on 2017/11/13 16:44
 * 邮箱：18014168291@189.cn
 * 才智科技
 */
public class MineFragment extends BaseFragment implements View.OnClickListener {
    private RelativeLayout iv_settings;
    private ImageView imageView;
    @Override
    public int inflaterRootView() {
        return R.layout.fragment_mine;
    }

    @Override
    public void initUI() {
        iv_settings=findView(R.id.iv_settings);
        imageView=findView(R.id.head_img);
    }

    @Override
    public void initData() {

    }

    @Override
    public void addListeners() {
        iv_settings.setOnClickListener(this);
        imageView.setOnClickListener(this);
    }

    public static MineFragment newInstance() {
        
        Bundle args = new Bundle();
        
        MineFragment fragment = new MineFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onClick(View view) {
        Intent intent;
        switch (view.getId()) {
            case R.id.iv_settings:
                intent=new Intent(context, SettingsActivity.class);
                startActivity(intent);
                break;
            case R.id.head_img:
                intent=new Intent(context, PersonalDataActivity.class);
                startActivity(intent);
                break;
        }
    }
}
